//package com.woniu.config;
//
//import org.springframework.amqp.core.*;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.stereotype.Component;
//
//
//@Component
//public class ApplicationRabbitConfig {
//    public static String QueueName = "PHApplication_queue";
//    public static String ExchangeName = "PHApplication_exchange";
//    @Bean("PHApplication_queue")
//    public Queue getQueue(){
//        return QueueBuilder.durable(QueueName).build();
//    }
//
//    @Bean("PHApplication_exchange")
//    public Exchange getExchange(){
//        return ExchangeBuilder.topicExchange(ExchangeName).durable(true).build();
//    }
//
//    @Bean("PHApplication_binding")
//    public Binding getBinding(@Qualifier("PHApplication_queue")Queue queue,@Qualifier("PHApplication_exchange")Exchange exchange){
////        return new Binding(QueueName, Binding.DestinationType.QUEUE,ExchangeName,"PHApplication.add",null);
//        return BindingBuilder.bind(queue).to(exchange).with("PHApplication.add").noargs();
//    }
//}
